package com.aboo.infrastructure.base.util.common;

import java.util.Arrays;
import java.util.List;

/**
 * @author louan
 * @date 2024-06-29
 * @description
 */
public class ArrayUtils {

    public static boolean isEmpty(Object[] array) {
        return array == null || array.length == 0;
    }

    public static boolean isNotEmpty(Object[] array) {
        return !isEmpty(array);
    }

    public static <T> List<T> toList(T[] array) {
        if (array == null) {
            return null;
        }
        return Arrays.asList(array);
    }
}
